<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    var fn = function sum(num1, num2) {     // 定义函数表达式，求和
      return num1 + num2;
    };
    fn(1, 2);                               // 调用函数
  </script>
</body>
</html>